package com.djsearch.ui;

import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;

import com.djsearch.R;
import com.djsearch.controller.JSONResp;

/**
 * 我的订单
 * @author yinxing
 *
 */
public class MyOrderActivity extends BaseActivity{

	private Button btnBack;
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		getWindow().requestFeature(Window.FEATURE_NO_TITLE);
		getWindow().setFlags(
				WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
		getWindow().setSoftInputMode(
				WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
		setContentView(R.layout.myorder_layout);
		initView();
		initOnClick();
	}
	
	@Override
	void initHandler() {
		// TODO Auto-generated method stub
		
	}

	@Override
	void initView() {
		// TODO Auto-generated method stub
		btnBack = (Button)findViewById(R.id.btnBack);
	}

	@Override
	void initOnClick() {
		// TODO Auto-generated method stub
		btnBack.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				finish();
			}
		});
	}

	/**
	 * 点击返回键
	 */
	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		// TODO Auto-generated method stub
		
		if (keyCode == KeyEvent.KEYCODE_BACK) {
			startActivity(MyOrderActivity.this, SetActivity.class, 1);
		}
		return false;
	}

	@Override
	void getDataToResolve(JSONResp response) {
		// TODO Auto-generated method stub
		
	}
}
